﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace App_Clinique.ClassLibrary.Entities
{
    public partial class Consultation
    {
        public Consultation()
        {
            this.ConsultationID = Guid.NewGuid();
        }

        [Column("ConsultationID", Order = 0), Key]
        public virtual Guid ConsultationID { get; set; }

        [Column("DateConsultationPrevue"), Required]
        public virtual DateTime DateConsultationPrevue { get; set; }

        [Column("DateConsultationReelle")]
        public virtual Nullable<DateTime> DateConsultationReelle { get; set; }

        [Column("Duree")]
        public virtual Nullable<TimeSpan> Duree { get; set; }

        [Column("Commentaire"), StringLength(1000)]
        public virtual String Commentaire { get; set; }

        /****************************************************************************************************
         * Foreign Keys - IDs
         ***************************************************************************************************/
        [Column("PatientID", Order = 1)]
        public virtual Guid PatientID { get; set; }

        [Column("OrdonnanceID", Order = 2)]
        public virtual Nullable<Guid> OrdonnanceID { get; set; }

        /****************************************************************************************************
         * Foreign Keys - Reference Objects
         ***************************************************************************************************/
        public virtual Patient Patient { get; set; }
        public virtual Ordonnance Ordonnance { get; set; }

        /****************************************************************************************************
         * Collections
         ***************************************************************************************************/
    }
}
